<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0, width=device-width"/>
	<title>api</title>
	<link rel="stylesheet" type="text/css" href="../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../css/common.css" />
	<link rel="stylesheet" type="text/css" href="../css/activity.css" />
	<script>
    (function () {
        function o() {
            document.documentElement.style.fontSize = (document.documentElement.clientWidth > 414 ? 414 : document.documentElement.clientWidth) / 12 + "px"
        }

        var e = null;
        window.addEventListener("resize", function () {
            clearTimeout(e), e = setTimeout(o, 300)
        }, !1), o()
    })(window);

	</script>
	<style>
		#body-wrapper,body,html{
			background: #fff;
			height: 100%;
			width: 100%;
			
		}
		#content-container{
			background-color: #f8f8f8;
		}
		.firstdouble{
			background: #ba1902;
			
		}
		
		.page{
			position:relative;
			overflow:hidden;
			background: url('../image/activity/activity-first-double.png') no-repeat;
			background-size: 100% auto;
			padding-top: 8.9rem;
		}
		.btn-rule{
			background: url('../image/activity/rule.png') no-repeat;
			background-size: 3.04em 2.68em;
			position: absolute;
			display:block;
			right: 0.2em;
			top: 0em;
			width:3.04em;
			height: 2.68em;
		
		}
		.firstdouble .page .btn_apply {
		    background: url(http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/485072a1.btn_default.png) no-repeat;
		    background-size: 6.82667rem 1.82667rem;
		    width: 6.82667rem;
		    height: 1.82667rem;
		    text-align: center;
		    margin: 0 auto;
		    display: block;
		    line-height: 1.82667rem;
		    font-size: 22px;
		    color: #722e18;
		    font-weight: 700;
		}
		.firstdouble .recharge_content{
			padding: 0.5rem 0.13333rem 0.45333rem;
			background: #e33219;
		}
		.firstdouble .page .top_img{
			background: url('../image/activity/top-img-recharge.png') no-repeat top;
			background-size: 100% auto;
			height: 0.34667rem;
			margin-top: -.34667rem;
		}
		 .mid_cont {
		    background: #fff1ca;
		    border-bottom-left-radius: 0.06667rem;
		    border-bottom-right-radius: 0.06667rem;
		    margin: -0.02667rem 0.2rem;
		    padding: 0.24rem 0.24rem 0.26667rem;
		    color: #722e18;
		    font-size: 14px;
		}
		.mid_cont .list li .btn {
		    background: #fff583;
		    box-shadow: 0 0.10667rem 0 #ffdf3b;
		    width: 3.2rem;
		    height: 0.69333rem;
		    display: block;
		    line-height: 0.73333rem;
		    text-align: center;
		    color: #722e18;
		    font-size: 14px;
		    border-radius: 0.06667rem;
		    margin: 0 auto;
		}
		.tit {
		    padding-left: 0.31rem;
		    font-size: 12px;
		    margin-bottom: 0.24rem;
		}
		.mid_cont .list {
    		/* margin-left: -.16rem; */
		}
		.mid_cont .list li.first {
    		background-image: url(http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/49919dde.img_200.png);
		}
		.mid_cont .list li.two {
		    background-image: url(http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/23f16163.img_100.png);
		}
		.mid_cont .list li.three {
    		background-image: url(http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/73c63eb1.img_50.png);
		}
		.mid_cont .list li.four {
   			background-image: url(http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/5adc716a.img_20.png);
		}
		.mid_cont .list li {
		    width: 4.80667rem;
		    height: 1.06667rem;
		    display: inline-block;
		    margin-left: 0.33333rem;
		    margin-bottom: 0.34667rem;
		    background-repeat: no-repeat;
		    background-size: 100% auto;
		    padding-top: 2.4rem;
		    text-align: center;
		}
		.page .bottom_img {
		    background: url('http://wap.jqmao.cn/staticsmwap/templates/yungou/images/mobile/active/fssdaassff.png') no-repeat top;
		    background-size: 100% auto;
		    height: 1.41333rem;
		    margin-top: -.02667rem;
		}
		.rule_info {
		    color: #fff1ca;
		    padding-top: 0.66667rem;
		}
		.rule_info .tit {
		    font-size: 32px;
		    border-top: 0.038rem solid #fff1ca;
		    position: relative;
		    width: 90%;
		    margin: 0 auto;
		}
		.rule_info .tit .line {
		    padding: 0 0.2rem;
		    background: #ba1902;
		    position: absolute;
		    top: -.41333rem;
		    margin-left: -1.3rem;
		    left: 50%;
		    height: 0.82667rem;
		    width: 2rem;
		}
		.firstdouble .rule_info .tit .line .txt {
		    background: #ba1902;
		    font-size: 16px;
		    height: 0.82667rem;
		    line-height: 0.86667rem;
		    width: 2.4rem;
		    text-align: center;
		    display: block;
		}
		.firstdouble .rule_info .list {
		    width: 85%;
		    margin: 0.4rem auto 0;
		    padding-bottom: 0.4rem;
		    list-style: decimal;
		}
		.firstdouble .rule_info .list li {
		    font-size: 13px;
		    padding-top: 0.2rem;
		}
		.acctivify-header{
			position: fixed;
			left: 0;
			right: 0;
			top: 0;
			z-index: 5;
		}
		
	</style>
</head>
<body>
	<div >
		<div id="body-wrapper">
			<div id='content-container'>
				
				<div class="firstdouble" >
					<div class="page">
						<a href="#J_rules" class="btn-rule"></a>
						<span id="receive" class="btn_apply" onclick="receive()"></span>		
						
						<div class="recharge_content">
						<p class="top_img"></p>
					
						<div class="mid_cont">
							<p class="tit">
							<span>参与活动首次充值,可享</span><span class="red_txt">100%</span>
							<span >返利,只能参与</span>
							<span class="red_txt" >1次</span>
							<span >哦！</span>
							</p>
							<ul class="list">
								<li class="first" >
									<span class="btn" data-level="200" onclick='_rechange(200)'>充值200元</span>
								</li>
								<li class="two">
									<span class="btn" data-level="100" onclick='_rechange(100)'>充值100元</span>
								</li>
								<li class="three">
									<span class="btn" data-level="50" onclick='_rechange(50)'>充值50元</span>
								</li>
								<li class="four">
									<span class="btn" data-level="20" onclick='_rechange(20)'>充值20元</span>
								</li>
							</ul>
						</div>
					</div>
					
					<p class="bottom_img"></p>
				</div>
				<div class="rule_info" id="J_rules" data-reactid=".0.1.2">
				<div class="tit" data-reactid=".0.1.2.0">
				<div class="line" data-reactid=".0.1.2.0.0">
				<p class="txt" data-reactid=".0.1.2.0.0.0">活动说明</p>
				</div></div>
				<ul class="list" data-reactid=".0.1.2.1">
				<li data-reactid=".0.1.2.1.0">活动时间：2016.9.8-2016.12.31。</li>
				<li data-reactid=".0.1.2.1.1">用户需领取活动资格后才能参与活动。</li>
				<li data-reactid=".0.1.2.1.2">每个用户只能参与1次活动，领取活动资格后，单次充值（包含消费时充值）达到对应的额度即参与成功。</li>
				<li data-reactid=".0.1.2.1.3">返利的红包从充值当日开始起每天返10%，第10天全部返还。</li>
				<li data-reactid=".0.1.2.1.4">返还的红包将直接发放到用户的账户中，请在“我的” &gt;&gt; “我的红包“界面查看。红包有有效期限，请及时使用。</li>
				<li data-reactid=".0.1.2.1.5"><span data-reactid=".0.1.2.1.5.0">活动最终解释权归</span>
				<span data-reactid=".0.1.2.1.5.1">机器猫</span><span data-reactid=".0.1.2.1.5.2">团队所有。</span></li></ul></div>
			</div>
			
		</div>
	</div>
</body>
	<script type="text/javascript" src="../script/zepto.min.js"></script>
	<script type="text/javascript" src="../script/api.js"></script>
	<script type="text/javascript" src="../script/doT.min.js"></script>
	<script type="text/javascript" src="../script/common.js"></script>
	<script>
	var uid = null;
	var t = $api.byId("receive");
		apiready = function(){
			headerstatus();
			uid = $api.getStorage('user').uid;
			if(!uid){
				
				$api.html(t, "您还没有登录！");
			}else{
			api.ajax({
	            url:'http://wap.jqmao.cn/checkReceive?uid='+uid
            },function(ret,err){
            	//coding...
            	if(ret){
            	
            		if(ret.code=='0'){
            			$api.html(t, "领取活动资格");
            		}else if(ret.code=='1'){
            			$api.html(t, "已经领取资格");
            		}else if(ret.code=='2'){
            			$api.html(t, "已经参与活动");
            		}
            	}else{
            		////alert(JSON.stringify(err));
            	}
            });
            }
			
			
		}
		//领取资格
		function receive(){
			api.ajax({
	            url:'http://wap.jqmao.cn/receive?uid='+uid
            },function(ret,err){
            	//coding...
            	if(ret.code=='0'){
            		$api.html(t, "已经领取资格");
            	}else{
            		////alert(JSON.stringify(err));
            	}
            });
		}
		function _rechange(m){
			if(!uid){
				dialogBox_alert1();
				$api.html(t, "您还没有登录！");
			}else{
			
				openWin("rechange",parseInt(m))
			}
			
		}
		
	</script>
	<!-- <script type="text/javascript" src="../script/main.js"></script> -->
	
</html>